<?php
class AjaxComponent extends Object {
	var $controller;

	function startup(&$controller) {
		$this->controller = $controller;
	}
	
	function message($msg, $noError = true) {
		if (!is_array($msg)) {
			$arr = array(
				'error'		=>	$noError,
				'message'	=>	$msg
			);
		}
		
		Configure::write('debug', 0);
		echo json_encode($arr);
		exit;
	}
}
?>